package cn.diancan.util;

public class MultiPhotoFormatUtil {

    /**
     * 多张图片格式处理
     * @param images
     * @return
     */
    public static String process(String images){
	images=images.replace(" ", "");
	while(images.indexOf(",,")!=-1){
	    images = images.replaceAll(",,", ",");
	}
	if(images.startsWith(",")){
	    images = images.substring(1);
	}
	if(images.endsWith(",")){
	    images = images.substring(0,images.length()-1);
	}
	return images;
    }
    
    public static void main(String[] args) {  
	System.out.println(process(",,,,,,"));
    }
 
}
